# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Camille Moncelier <pix@devlife.org>

pkgname=m17n-lib
pkgver=1.8.2
pkgrel=1
pkgdesc='Multilingual text processing library (runtimes)'
url='https://www.nongnu.org/m17n/'
arch=('x86_64')
license=('GPL')
depends=('libxft' 'm17n-db' 'fribidi' 'libthai' 'libxml2' 'gd' 'libotf')
makedepends=('anthy' 'ispell')
optdepends=('anthy: to use the anthy input method'
            'ispell: to use the ispell input method')
options=('!makeflags' '!emptydirs')
validpgpkeys=('D68584F9B40A6502FD7C53015F592A4029890630')
source=("https://download.savannah.gnu.org/releases/m17n/${pkgname}-${pkgver}.tar.gz")
sha256sums=('e5b0344af9f115d94957a3f9b9debc4f8e671b69f8c1fd5e0b688a794d7a27f2')

prepare() {
  cd ${pkgname}-${pkgver}
  sed -i 's/freetype-config/pkg-config freetype2/' configure
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
